//
//  SingleTroopForm.cpp
//  fingeradvanture
//
//  Created by shuaibincheng on 16/5/9.
//
//

#include "SingleTroopForm.hpp"

void SingleTroopForm::group()
{
    auto screenHeight = Director::getInstance()->getVisibleSize().height;
    auto screenWidth = Director::getInstance()->getVisibleSize().width;
    auto monster = members->at(0);
    
    troopSize.width = monster->getContentSize().width;
    troopSize.height = monster->getContentSize().height;
    
    troopVisibleSize.height= screenHeight;
    troopVisibleSize.width = screenWidth;
    
    monster->setPosition(screenWidth / 2, screenHeight + troopSize.height / 2 + 10);
    
    getAction()->train(*members);
}

std::vector<TroopStyleType> SingleTroopForm::allowedTroopStyles()
{
    std::vector<TroopStyleType> styles;
    
    styles.push_back(TYPE_LINEONETYPESTYLE);
    
    return styles;
}
std::vector<TroopActionStyle> SingleTroopForm::allowedTroopActionStyle()
{
    std::vector<TroopActionStyle> types;
    types.push_back(TYPE_TRANSLATIONASGROUP);
    return types;
}